<div class="cateedit">
	<form action="<?php echo url('category/edit');?>" method="post" id="editForm">
		<table>
			<tr>
				<td width="80" class="inputtxt" align="right"><span>分类名称</span></td>
				<td align="left">
					<input type="text" class="required" name="cate[title]" value="<?php echo $cate['title'];?>" />
					<span style="color:red; margin-left: 6px;">*</span>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>上级分类</span></td>
				<td align="left">
					<?php echo fetch('categorySelect',array('name'=>"cate[parentID]",'type'=>$cate['typeID'],'parentID'=>$cate['parentID'],'cateID'=>$cate['id'],'show'=>1));?>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>排序ID</span></td>
				<td align="left">
					<input type="text"  name="cate[sortID]" value="<?php echo $cate['sortID'];?>" />
				</td>
			</tr>
			<tr>
				<td align="right">图片:</td>
				<td align="left" class="magin"><?php echo fetch('uploadImg',array('images'=>isset($images)?$images:array(),'limit'=>1));?></td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>分类描述</span></td>
				<td align="left">
					<textarea name="cate[description]" cols="60" rows="4"><?php echo $cate['description'];?></textarea>
				</td>
			</tr>
			
			<tr><td colspan="2" align="right"><input type="submit" value="修改" id="catesub"/></td></tr>
		</table>
		<input type="hidden" name="id" value="<?php echo $cate['id'];?>" />
		<input type="hidden" name="type" value="<?php echo $cate['typeID'];?>" />
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	submitForm("#editForm",{
		dataType:'json',
		success:function(data){
				if(data.s=='1'){
					location.href="<?php echo url('category/index?type=');?>"+data.i;
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
